package com.wgod.demo.business.mapper;

import tk.mybatis.mapper.common.Mapper;
import org.apache.ibatis.annotations.Param;

import com.wgod.demo.business.entity.OptionsEntity;

import java.util.List;

/**
 * 网站配置Mapper
 * Created by WGod on 2018/4/29.
 */
public interface OptionMapper extends Mapper<OptionsEntity> {

    /**
     * 删除网站配置
     * @param name
     * @return
     */
    int deleteOptionByName(@Param("name") String name);

    /**
     * 更新网站配置
     * @param options
     * @return
     */
    int updateOptionByName(OptionsEntity options);

    /***
     * 根据名称获取网站配置
     * @param name
     * @return
     */
    OptionsEntity getOptionByName(@Param("name") String name);

    /**
     * 获取全部网站配置
     * @return
     */
    List<OptionsEntity> getOptions();
}
